import pandas as pd
df_wine=pd.read_csv('https://archive.ics.uci.edu/ml/'
'machine-learning-databases/wine/wine.data',
header=None)
df_wine.columns=['Class label', 'Alcohol' ,'Malic acid', 'Ash', 'Alcalinity of ash',
'Magnesium', 'Total phenols', 'Flavanoids', 'Noneflavanoid phenols', 'Proanthocyanins',
'Color intensity', 'Hue', '0D280/0D315 of diluted wines', 'Proline']
from sklearn.model_selection import train_test_split
X, y=df_wine.iloc[:,1:].values, df_wine.iloc[:,0].values
X_train, X_test, y_train, y_test=\
train_test_split(X, y, test_size=0.3, random_state=0, stratify=y)